<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./js/template-web.js"></script>
    <script src="./assets/zepto/zepto.min.js"></script>
</head>
<body>
    <div>
        <ul class='ulBox'>

        </ul>
    </div>
    <script type='html/text' id='tmp'>
        {{each rows value index}}
        <li>
            <span>{{value.id}}</span>
            <span>{{value.name}}</span>
        </li>
        {{/each}}
    </script>
    <script>
        var obj={
            name: 'zhangsan',
            rows:[{name:'zhangsan',id:1},{name:'zhangsan2',id:2},{name:'zhangsan3',id:3}]
        }

        var htmls=template('tmp',obj);
        $('.ulBox').html(htmls);
    </script>
</body>
</html>